package com.example.finalwork.controller;


import com.example.finalwork.model.Normal;
import com.example.finalwork.model.Paper;
import com.example.finalwork.service.NormalService;
import com.example.finalwork.service.PaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.HttpStatusCode;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
@RequestMapping("/normal")
public class NormalController {

    @Autowired
    private NormalService normalService;

    @GetMapping
    public String viewNormal(Model model) {
        model.addAttribute("normal", normalService.findAll());
        return "normal";
    }

}



